<?php

namespace common\models\base;

use Yii;

/**
 * This is the model class for table "{{%archive_addon_diary}}".
 *
 * @property integer $id
 * @property string $ob_addr
 * @property string $ob_object
 * @property string $ob_date_start
 * @property string $ob_date_end
 * @property string $description
 * @property string $description_professor
 * @property string $future
 * @property string $future_professor
 * @property integer $status
 */
class ArchiveAddonDiary extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%archive_addon_diary}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id', 'ob_date_start', 'ob_date_end'], 'required'],
            [['id', 'status'], 'integer'],
            [['ob_date_start', 'ob_date_end'], 'safe'],
            [['description', 'description_professor', 'future', 'future_professor'], 'string'],
            [['ob_addr', 'ob_object'], 'string', 'max' => 255],
            [['id'], 'exist', 'skipOnError' => true, 'targetClass' => Archive::className(), 'targetAttribute' => ['id' => 'id']],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'ob_addr' => '活动地址',
            'ob_object' => '观察对象',
            'ob_date_start' => '开始观察日期',
            'ob_date_end' => '截止观察日期',
            'description' => '这里发生了怎样的学习',
            'description_professor' => '专家建议-这里发生了怎样的学习',
            'future' => '未来的机会与可能性',
            'future_professor' => '专家建议-未来的机会与可能性',
            'status' => '状态',
        ];
    }
}
